package com.xnccc.audioset;

import com.owen.mapx.MapX;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.Window;

public class ChangeDialog extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		setContentView(R.layout.change_sound);

		findViewById(R.id.sound_tz).setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				MainActivity.bird.switchSRC(MapX.SRC_COAXIAL);
				ChangeDialog.this.finish();
			}
		});

		findViewById(R.id.sound_gq).setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				MainActivity.bird.switchSRC(MapX.SRC_OPTICAL);
				ChangeDialog.this.finish();
			}
		});

		findViewById(R.id.sound_aux).setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				MainActivity.bird.switchSRC(MapX.SRC_ADC);
				ChangeDialog.this.finish();
			}
		});

		findViewById(R.id.hdmi_1).setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				MainActivity.bird.switchSRC(MapX.SRC_ARM);
				ChangeDialog.this.finish();
			}
		});

		findViewById(R.id.hdmi_2).setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				MainActivity.bird.switchSRC(MapX.SRC_ARM);				
				ChangeDialog.this.finish();
			}
		});

		findViewById(R.id.hdmi_3).setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				MainActivity.bird.switchSRC(MapX.SRC_ARM);
				ChangeDialog.this.finish();
			}
		});
	}
}
